﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="NewGallery.aspx.cs" Inherits="Marta.buchalska.wesele.Admin.NewGallery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView runat="server" ID="NewGalleryForm" DataKeyNames="ID" DataSourceID="LinqDataSource1"
        DefaultMode="Insert" OnItemInserting="NewGalleryForm_ItemInserting" 
        oniteminserted="NewGalleryForm_ItemInserted">
        <InsertItemTemplate>
            Kategoria :<asp:DropDownList runat="server" DataTextField="Name" DataValueField="ID"
                ID="CategryList" DataSourceID="Categories">
            </asp:DropDownList>  <br />
            Nazwa galerii:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
          
            <asp:LinqDataSource ID="Categories" runat="server" ContextTypeName="Marta.buchalska.wesele.DataModel.WeedingDBDataContext"
                EntityTypeName="" Select="new (ID, Name)" TableName="Photo_categories">
            </asp:LinqDataSource>
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Zapisz" />
            &nbsp;
        </InsertItemTemplate>
    </asp:FormView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Marta.buchalska.wesele.DataModel.WeedingDBDataContext"
        EntityTypeName="" TableName="Photo_galleries" EnableInsert="True">
    </asp:LinqDataSource>
</asp:Content>
